package com.junyidao.game.service;

import com.junyidao.game.mapper.POperLogMapper;
import com.junyidao.game.pojo.POperLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by zzh on 2016/8/16.
 */
@Service
@Transactional
public class OperLogService {

    @Autowired
    private POperLogMapper operLogMapper;

    @Autowired
    private SequenceService sequenceService;

    public void addOperLog(POperLog log) {
        Integer id = sequenceService.getNextSequence("LOGIN_LOG_ID");
        log.setLogId(id);
        operLogMapper.insert(log);

    }
}
